#include <iostream>

using namespace std;

const int N = 1e5 + 10;

typedef long long LL;

LL f[N];


int main()
{
	int n, m;
	cin >> n >> m;
	for(int i = 1; i <= n; i++)
	{
		LL x;
		cin >> x;
		f[i] += x;
		f[i+1] -= x;
	}
	while(m--)
	{
		LL l, r, k;
		cin >> l >> r >> k;
		f[l] += k;
		f[r+1] -= k;
	}
	for(int i = 1; i <= n; i++)
	{
		f[i] = f[i-1] + f[i];
		cout << f[i] << " ";
	}
	return 0;
}
